package com.ziyun.pop.modules.storeMaterialCheck.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.utility.New;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.pop.modules.storeMaterialCheck.dao.StoreMaterialCheckDetailDao;
import com.ziyun.pop.modules.storeMaterialCheck.entity.StoreMaterialCheckDetailEntity;
import com.ziyun.pop.modules.storeMaterialCheck.service.StoreMaterialCheckDetailService;


@Service("storeMaterialCheckDetailService")
public class StoreMaterialCheckDetailServiceImpl extends ServiceImpl<StoreMaterialCheckDetailDao, StoreMaterialCheckDetailEntity> implements StoreMaterialCheckDetailService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<StoreMaterialCheckDetailEntity> page = (Page<StoreMaterialCheckDetailEntity>) this.page(
                new Query<StoreMaterialCheckDetailEntity>(params).getPage(),
                new QueryWrapper<StoreMaterialCheckDetailEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<StoreMaterialCheckDetailEntity> getCheckDetailList(Integer checkId) {
        Map<String, Object> map = New.hashMap();
        map.put("del",0);
        map.put("check_id",checkId);
        return this.baseMapper.selectByMap(map);
    }

}
